package com.wanmait.demo.service.impl;

import com.github.pagehelper.PageInfo;
import com.wanmait.demo.mapper.RoleMapper;
import com.wanmait.demo.pojo.Role;
import com.wanmait.demo.service.RoleService;
import com.wanmait.demo.util.Layui;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
@Service
@Transactional(rollbackFor = Exception.class)
public class RoleServiceimpl implements RoleService {
    @Resource
    private RoleMapper roleMapper;
    @Override
    public void insert(Role object) {

    }

    @Override
    public void delete(Integer id) {

    }

    @Override
    public void delete(String ids) {

    }

    @Override
    public void update(Role object) {

    }

    @Override
    public Role findById(Integer id) {
        return null;
    }

    @Override
    public List<Role> findAll() {
        return roleMapper.selectList();
    }

    @Override
    public PageInfo<Role> findPage(int pageNum, int pageSize) {
        return null;
    }

    @Override
    public Layui<Role> findRole() {
        List<Role> roles= roleMapper.selectRole();
        Layui<Role> layui=Layui.successsWithData(0,roles);
        return layui;
    }
}
